package jsonparser.core.parser.nt;

/**
 * Created by pendragon on 17-5-20.
 */
public class Value {

    private ValueType type;
    private Object value;

    public ValueType getType() {
        return type;
    }

    public void setType(ValueType type) {
        this.type = type;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return value.toString();
    }

    public enum ValueType{
        /**
         * string
         */
        STRING,

        /**
         * int, float, scientific, all in the form of double
         */
        NUMBER,

        /**
         * another JSONObject
         */
        JSONOBJECT,

        /**
         * another JSONArray
         */
        JSONARRAY,

        /**
         * true, false
         */
        BOOLEAN,

        /**
         * null
         */
        NULL;
    }
}
